import request from '@/api/api'

const getLogin = () => {
    return request({
        url: "/index/index",
        method: 'get',        //发生请求方式
    })
}

const ClosingBox = () => {
    return request({
        url: "search/indexaction?openId=66",
        method: 'get',
    })
}
//收索栏收缩出来的数据
//http://shop.bufantec.com/bufan/search/helperaction?keyword=1&order=asc

const output = (keyword, order) => {
    return request({
        url: `/search/helperaction?keyword=${keyword}&order=${order}`,
        method: 'get',
    })
}

//跳转 居家 厨具分类列表
const JumpHome = (id) => {
    return request({
        url: `/category/categoryNav?id=${id}`,
        method: 'get'
    })
}
const HomeRendering = (id) => {
    return request({
        url: `/goods/goodsList?categoryId=${id}`,
        method: 'get'
    })
}
//http://shop.bufantec.com/bufan/goods/detailaction?id=1134030&openId=66

//商品详情页
const DetailsPage = (Id, openId) => {
    return request({
        url: `/goods/detailaction?id=${Id}&openId=${openId}`,
        method: 'get'
    })
}

export {
    getLogin,
    ClosingBox,
    output,
    JumpHome,        //跳转居家链接
    HomeRendering,   //渲染居家列表
    DetailsPage
}